<extend name="Index:index" />
    <block name="nav1">
        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a href="#">Admin</a>
            </li>
            <li class="active">人才发展</li>
        </ul><!-- .breadcrumb -->
    </block>

    <block name="nav2">
        <h1>
        人才发展
            <small>
                <i class="icon-double-angle-right"></i>
                项目竞标列表
            </small>
        </h1>
    </block>

    <block name="main">
        <div class="row">
        	<form action="" method="post">
       		
				项目名称：<input type="text" name="project_name" <if condition="$project_name">value="<{$project_name}>"</if>/>&nbsp;&nbsp;
				&nbsp;&nbsp;
				<input type="submit" value="查询" class="btn"/>			
			</form>
             <table class="table table-bordered h5 tb">
                <tr>
                    <th >项目名称</th>
                    <th >项目价格</th>
                    <th >项目简介</th>
                    <th >开始时间</th>
                    <th >预期结束时间</th>
                    <th >实际结束时间</th>
                    <th >完成状态</th>
                    <th >项目承包公司</th>
                    <th >联系地址</th>
                    <th >联系人</th>
                    <th >联系人电话</th>
                    <th >联系人手机</th>
                    <th >本公司负责人</th>
                    <th >添加人</th>
                    <th >添加时间</th>
                    <th >操作</th>
                </tr>
                <volist name="info[0]" id="vo" key="k">
                <tr class="alt" id="list<{$k}>">
                    <td><{$vo.project_name}></td>
                    <td><{$vo.price}></td>
                    <td><{$vo.project_intro}></td>
                    <td><{$vo.start_time}></td>
                    <td><{$vo.end_time}></td>
                    <td><{$vo.real_end_time}></td>
                    <td><if condition="$vo['status'] eq 0">未完成<else/>已完成</if></td>
                    <td><{$vo.charge_company}></td>
                    <td><{$vo.addr}></td>
                    <td><{$vo.charge_person}></td>
                    <td><{$vo.phone}></td>
                    <td><{$vo.tel}></td>
                    <td><{$vo.my_company}></td>
                    <td><{$vo.add_person}></td>
                    <td><{$vo.add_time}></td>
                    <td>
                    	<a href="<{:U('Person/add_project',array('type'=>1,'id'=>$vo['id']))}>">编辑</a>&nbsp;&nbsp; 
						<a id=" jh" onclick="del(<{$vo.id}>, <{$k}>,'project')" style="cursor:pointer">删除</a>
					</td>
                    
                </tr>
                </volist>
            </table>
            <div class="pages"><{$info[1]}></div>
        </div>
	<script>
    
    	//删除操作 
		function del($id,$k,$table){
			var table=$table;
			var data="table="+table+"&id="+$id;
			var obj="#list"+$k;
			obj=$(obj);
			
			$.ajax({
				url:"<{:U('Person/del')}>",
				type:"post",
				data:data,
				success:function(data){
					if(data){
						/* obj.html(""); */
						alert("删除成功");
						window.location.href=data;
						
					}else{
						alert("删除失败");
					}
				},
				error:function(data){
					alert("删除失败");
				}
			});
		}
    	
    	
    </script>
    <script>
    //搜索 
    $(function(){
    	
    	$('[name="type_one"]').change(function(){
    		var pid=$(this).val();
    		
   			var data="pid="+pid;
       		$.ajax({
       			url:"<{:U('Course/sel_class')}>",
       			type:"post",
       			data:data,
       			dataType:"json",
       			success:function(data){
       				$('[name="type_two"]').html("");
       				var o='<option value="" class="speci">全部</option>';
   					$('[name="type_two"]').prepend(o);
       				if(data){
       					$.each(data,function(i,val){
       						var obj='<option value="'+val['id']+'"';
       						if('<{$where['type_two']}>'== val['id']){
       							obj+='selected="selected"';
       						}
       						obj+='>'+val['name']+'</option>';
       						
       						$('[name="type_two"]').append(obj);
       					});
       					
       				}
       				
       			}
       			
       		});
    		
    		
    	});
    	
    });
    
    </script>
    </block>
